package main

import (
	"fmt"
	"os"
	"text/tabwriter"
)

func usage() {
	_, _ = fmt.Fprintf(os.Stderr, "\n	"+bold.Render(APP_NAME+" "+Version)+"\n\n Usage: go-walker.exe [Flags] <path>\nExample: go-walker.exe --icons ~/\n")
	tb_writer := tabwriter.NewWriter(os.Stderr, 0, 8, 2, ' ', 0)

	put_func := func(s string) {
		_, _ = fmt.Fprintf(tb_writer, s)
	}
	put_func("builtin CMD inside go-walker.exe: \n")
	put_func("    arrows, hjkl\tMove cursor\n")
	put_func("    enter\tEnter directory\n")
	put_func("    backspace\tExit directory\n")
	put_func("    space\tToggle preview\n")
	put_func("    esc, q\tExit with cd\n")
	put_func("    ctrl+c\tExit without cd\n")
	put_func("    /\tFuzzy search\n")
	put_func("    d, delete\tDelete file or dir\n")
	put_func("    y\tYank current directory path to clipboard\n")
	put_func("    .\tHide hidden files\n")
	put_func("supported Flags in go-walker.exe:")
	put_func("\n  Flags:\n")
	put_func("    --icons\tdisplay icons\n")
	put_func("    --dir-only\tshow dirs only\n")
	put_func("    --preview\tdisplay preview\n")
	put_func("    --fuzzy\tfuzzy mode")

	_ = tb_writer.Flush()
	os.Exit(1)
}
